package com.learn.iot.handler;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyInvocationHandler implements InvocationHandler {

	Object o;

	public MyInvocationHandler(Object o) {
		this.o = o;
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

		System.out.println("aop start");
		Object result = method.invoke(o);
		System.out.println("aop finished");

		return result;
	}
}
